package com.zengjin.controller;


import com.zengjin.config.TableClass;
import com.zengjin.service.GenerateCodeService;
import com.zengjin.test.common.R;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 19324
 */
@RestController
@RequestMapping("/generate")
public class GenerateCodeController {
    @Resource
    private GenerateCodeService generateCodeService;


    //生成代码
    @PostMapping("/generateCode")
    public R generateCode(@RequestBody List<TableClass> tableClassList, String pathName) {
        return generateCodeService.generateCode(tableClassList, pathName);
    }

}
